home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 40
/
Aminet 40 (2000)(Schatztruhe)[!][Dec 2000].iso
/
Aminet
/
util
/
cdity
/
ModeProSrc.lha
/
Daemon
/
DNodeStuff.c
< prev
next >
Wrap
C/C++ Source or Header
|
1998-10-02
|
1KB
|
62 lines
#include "MP.h"
UBYTE *Topaz="topaz.font";
extern struct MPSem *MPSem;
void CloneTextAttr(struct TTextAttr *Source, struct TTextAttr *Dest)
{
CopyMem(Source,Dest,sizeof(struct TextAttr));
if(Dest->tta_Name=AllocVec(strlen(Source->tta_Name)+1,MEMF_CLEAR|MEMF_PUBLIC))
{
strcpy(Dest->tta_Name,Source->tta_Name);
if(Dest->tta_Style & FSF_TAGGED)
{
if(!(Dest->tta_Tags=CloneTagItems(Source->tta_Tags)))
Dest->tta_Style &= (~FSF_TAGGED);
}
}
else
{
Dest->tta_Name=Topaz;
Dest->tta_YSize=8;
Dest->tta_Style=0;
Dest->tta_Flags=0;
}
}
struct DefaultNode *MatchDNode(STRPTR TaskName, STRPTR ScrTitle, ULONG ModeID)
{
struct DefaultNode *dnode;
STRPTR modename;
if(!(dnode=FindDNode(&MPSem->PromotionList[1],ScrTitle)))
{
if(!(dnode=FindDNode(&MPSem->PromotionList[0],TaskName)))
{
modename=GetModeName(ModeID);
dnode=Find_SMNode(&MPSem->PromotionList[PL_SCREENMODES],modename,ModeID);
FreeVec(modename);
}
}
return(dnode);
}
/*
struct DefaultNode *MatchAndDupDNode(STRPTR TaskName, STRPTR ScrTitle, ULONG ModeID)
{
struct DefaultNode *dnode;
ObtainSemaphore(&MPSem->NodeSem);
if(dnode=MatchDNode(TaskName.ScrTitle,ModeID))
{
dnode=DupDNode(dnode);
}
ReleaseSemaphore(&MPSem->NodeSem);
return(dnode);
}*/